// 1. for循环使用逗号运算符
/**
 *
 */

#include <iostream>

int main(void)
{
  long long a, n, sum, i, j;
  std::cin >> n;
  for (i = 1, j = 0, a = 1, sum = 0; i <= n, j < n, a = a * i, sum = sum + a; i++, j++)
  {
    std::cout << "sum : " << sum << std::endl;
  }
  printf("-----------------end----------------\n");
  return 0;
}